﻿using ControlCenter.Model;
using MingYuanYun.Data.Abstractions;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using ControlCenter.Model.BizEntities;
using ControlCenter.Model.WebApiDto;

namespace ControlCenter.Data
{
    /// <summary>
    /// 应用包配置仓储接口
    /// </summary>
    public interface IPackageConfigRepository : IRepositoryBase
    {
        /// <summary>
        /// 添加参数配置
        /// </summary>
        /// <param name="item"></param>
        /// <returns></returns>
        Task<bool> Add(PackageConfigItem item);

        /// <summary>
        /// 查询指定应用包的参数配置
        /// </summary>
        /// <param name="packageId"></param>
        /// <returns></returns>
        Task<IEnumerable<PackageConfigItem>> Query(Guid packageId);

        /// <summary>
        /// 更新应用包的参数配置
        /// </summary>
        /// <param name="packageConfigItem"></param>
        /// <returns></returns>
        Task<bool> Update(PackageConfigItem packageConfigItem);

        /// <summary>
        /// 删除应用包下的所有参数配置
        /// </summary>
        /// <param name="packageId"></param>
        /// <returns></returns>
        Task<bool> DeleteByPackageId(Guid packageId);
    }
}
